/*
 * @Author: tomystery 
 * @Date: 2018-07-15 09:55:57 
 * @Last Modified by: t
 * @Last Modified time: 2018-07-15 17:28:02
 */
import MUtil from 'util/mm.jsx';
const _mm = new MUtil();
class Order{

    getOrderList(listParam){
        let url = '';
        let data = {};
        if (listParam.orderNo === '') {
            url = '/manage/order/list.do';
            data.pageNum = listParam.pageNum;
        } else {
            url = '/manage/order/search.do';
            data.pageNum = listParam.pageNum;
            data.orderNo = listParam.orderNo;
        }

        return _mm.request({
            type: 'post',
            url: url,
            data: data
        })

    }

    //获取订单详细信息
    getOrderDetail(orderNo){
        return _mm.request({
            type: 'get',
            url: '/manage/order/detail.do',
            data:{
                orderNo:orderNo
            }
        })

    }

    //发货
    sendGoods(orderNumber){
        return _mm.request({
            type    : 'post',
            url     : '/manage/order/send_goods.do',
            data    : {
                orderNo : orderNumber
            }
        });
    }
}
export default Order